const WxParse = require('./wxParse/wxParse.js')

// eslint-disable-next-line
Component({
    properties: {
        content: {
            type: String,
            value: '',
            observer (val) {
                if (val) {
                    this.init(val)
                }
            }
        }
    },

    data: {
        wxParseData: []
    },

    methods: {
        init (content) {
            const res = WxParse.wxParse('wxParseData', 'html', content, this, 0)
            this.setData({
                wxParseData: res.nodes
            })
        }
    }
})
